// Get base url
function sortBy(value)
{
   var sort = document.getElementById('sort');
   if (value == sort.value)
   {
      if (value.match(/\bdesc/))
      {
         value.replace(/\bdesc/, '');
      }
      else
      {
         value = value + " desc";
      }
   }
   sort.value = value;


   document.forms[0].submit();
}
